package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.PowerMapper;
import priv.mill.entry.Power;
import priv.mill.server.PowerService;

@Component
public class PowerServiceImpl implements PowerService{

	private static final Logger logger = Logger
			.getLogger(PowerServiceImpl.class);

	@Autowired
	private PowerMapper powerMapper;
	
	@Override
	public Power getPowerById(Integer powerId) {
		return powerMapper.getPowerById(powerId);
	}

	@Override
	public Power getPowerByEntry(Power power) {
		return powerMapper.getPowerByEntry(power);
	}

	@Override
	public List<Power> getPowersByPage(Power power) {
		return powerMapper.getPowersByPage(power);
	}

	@Override
	public int updatePower(Power power) {
		return powerMapper.updatePower(power);
	}

	@Override
	public int insertPower(Power power) {
		return powerMapper.insertPower(power);
	}

	@Override
	public int deletePower(Integer powerId) {
		return powerMapper.deletePower(powerId);
	}
}
